package com.abc.service;

import com.abc.bean.Bunk;
import com.abc.bean.Department;
import com.abc.mapper.BunkMapper;
import com.abc.mapper.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: bc
 * @Date: 2024-11-17 12:37
 * @Description:
 */
@Service
public class DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;
    public List<Department> selectDepartment(String departmentName){
        return departmentMapper.selectDepartment(departmentName);
    }
    public List<Department> selectAllDepartment(){
        return departmentMapper.selectAllDepartment();
    }
    public int addDepartment(Department department){
        return departmentMapper.addDepartment(department);
    }
    public int deleteDepartment(String id){
        return departmentMapper.deleteDepartment(id);
    }
    public Department selectOneDepartmentById(String id){
        return departmentMapper.selectOneDepartmentById(id);
    }
    public int updateDepartmentById(Department department){
        return departmentMapper.updateDepartmentById(department);
    }
}
